package EBM.util;

public class BugID {
	public static String ConvertFromClientToServer(String id)
	{
		if (id.startsWith("D"))
		{
			int i;
			for(i = 1; i < id.length(); i++)
				if(id.charAt(i) != '0')
					break;
			if (i < id.length())
				return id.substring(i);
			else return "0";
		}
		else return id;
	}
	
	public static String ConvertFromServerToClient(String id)
	{
		int i;
		int j = 4 - id.length();
		for(i = 0; i < j; i++)
			id = "0" + id;
		return "D" + id;
	}
}
